package com.yenlien.traceyun.business.entity;

import com.yenlien.traceyun.business.trace.RecallSql;
import com.yenlien.traceyun.business.trace.Trace;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * 加工后成品
 *
 * @author maybe
 * @date 2020年7月28日
 */
@Entity
@Table(name = "t_plant_process_detail")
//@Trace(appName = "plant",stepName = "processDetail", order = 5,crossPoint = {"trace:reapDetail","purchase:storageManage"})
@Trace(appName = "plant", stepName = "processDetail", order = 5)
@RecallSql(sql = "select * from t_plant_process_detail p where  p.process_id in ({0}) ", sqlParams = {"processId"}, messageFormat = true)
public class ProcessDetail extends TraceScanEntity {
    @Column
    private String processId;            //加工ID  ProduceManage的ID
    @Column
    private String technologyId;        //工艺ID
    @Column
    private String technology;            //工艺名称
    @Column
    private String productName;            //产品名称
    @Column(name = "batch", unique = true)
    private String batch;                //加工批次
    @Column
    private String grade;                //品级
    @Column
    private String totalNumber;            //总量
    @Column
    private String surplusNumber;        //剩余量
    @Column
    private String units;                //单位
    @Column
    private String productId;            //关联产品ID

    private String code;    // 物料代码

    @Column(name = "product_img", length = 100)
    private String productImg;//关联产品图片

    private String type;

    private String spec;
    private String specUnits;

    @Column
    private int isCheck;                //是否检测(0:未检测，1：已检测)

    private String processPlanId;   // 生产计划的ID

    public String getProcessPlanId() {
        return processPlanId;
    }

    public void setProcessPlanId(String processPlanId) {
        this.processPlanId = processPlanId;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getSpec() {
        return spec;
    }

    public void setSpec(String spec) {
        this.spec = spec;
    }

    public String getSpecUnits() {
        return specUnits;
    }

    public void setSpecUnits(String specUnits) {
        this.specUnits = specUnits;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getProcessId() {
        return processId;
    }

    public void setProcessId(String processId) {
        this.processId = processId;
    }

    public String getTechnologyId() {
        return technologyId;
    }

    public void setTechnologyId(String technologyId) {
        this.technologyId = technologyId;
    }

    public String getTechnology() {
        return technology;
    }

    public void setTechnology(String technology) {
        this.technology = technology;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getBatch() {
        return batch;
    }

    public void setBatch(String batch) {
        this.batch = batch;
    }

    public String getGrade() {
        return grade;
    }

    public void setGrade(String grade) {
        this.grade = grade;
    }

    public String getTotalNumber() {
        return totalNumber;
    }

    public void setTotalNumber(String totalNumber) {
        this.totalNumber = totalNumber;
    }

    public String getSurplusNumber() {
        return surplusNumber;
    }

    public void setSurplusNumber(String surplusNumber) {
        this.surplusNumber = surplusNumber;
    }

    public String getUnits() {
        return units;
    }

    public void setUnits(String units) {
        this.units = units;
    }

    public String getProductId() {
        return productId;
    }

    public void setProductId(String productId) {
        this.productId = productId;
    }

    public int getIsCheck() {
        return isCheck;
    }

    public void setIsCheck(int isCheck) {
        this.isCheck = isCheck;
    }

    public String getProductImg() {
        return productImg;
    }

    public void setProductImg(String productImg) {
        this.productImg = productImg;
    }
}
